home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #6
/
Commodore_Disk_User_Vol.1_6_1988_-.d64
/
score keeper
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
53 lines
20 rem on-screen score maintenance utility
40 rem (c) jb kinley january 1988
50 rem place score in variable sc
60 rem number of lives in li%
70 rem initialise with sys 49152
80 rem subsequent calls to sys 49218
90 rem
100 if s=0 then s=1:load "skeep.mc",8,1
450 rem
470 rem** this program**
480 rem**is for demonstration only**
490 rem
500 blank$=" "
510 down$="":rem 24 csr downs
520 poke53280,0:poke53281,0
530 print"[147]"
540 m$="[159]on-screen score maintenance":gosub840
550 m$=blank$:gosub840
560 m$="[156]by j kinley january 1988":gosub 840
570 m$=blank$:gosub840
580 sys 49152:poke53287,1:rem print score in white
590 print""left$(down$,12);"[150]this program allows you to display"
600 print"game scores on-screen"
610 forsc=1to99999step999:sys49218:next
620 print"[154]irrespective of screen display mode"
630 print"[152]and unaffected by background scrolling"
640 forsc=999999to500000step-12345:sys49218:fors=1to100:next:next
650 print""down$
660 forsc=100to2500step100:fors=1to150:next:print:sys49218:next:sys49218
670 m$="[158]you can also maintain a count of":gosub840
680 m$="lives remaining":gosub840
690 fort=1to6:li%=t:sys49218:fors=1to800:next:next
700 print""down$
710 fort=1to25:print:sc=int(rnd(0)*1000000):li%=rnd(0)*7:sys49218
720 fors=1to500:next:next
730 m$="the score display can be placed":gosub840
740 m$="[159]anywhere on screen":gosub840
750 poke53264,(peek(53264)and254)
760 fort=1to15:x=rnd(1)*231+24:y=rnd(1)*160+50
770 fors=1to800:next:poke53248,x:poke53249,y:next
780 poke53269,(peek(53269)and254)
790 m$="[158]end of demonstration":gosub840
800 m$="[156]press 'r' to re-run, any key to exit":gosub840
810 geta$:ifa$=""then810
820 ifa$="r"then530
830 end
840 rem**message scrolling routine**
850 fort=39to1step-1
860 ms$=left$(m$,40-t)
870 print""tab(t)left$(down$,12);ms$;" "
880 fors=1to100:next
890 next:return